<template>
	<view class="discover">
		<view>
			<navigator url="/pages/login/login">登录</navigator>
		</view>
		<view class="al-card friend-list" v-for="(item,index) in list" :key="index">
			<view class="top">
				<view>{{item.brandName}}</view>
				<view>{{item.brandName}}</view>
			</view>
			<view>
				<text>{{item.desc}}</text>
				<view class="image-box">
					<image :src="item.shipaiPic[0]" mode="widthFix"></image>
					<image v-if="item.shipaiPic[1]" :src="item.shipaiPic[1]" mode="widthFix"></image>
					<image v-if="item.shipaiPic[2]" :src="item.shipaiPic[2]" mode="widthFix"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {getFriendCircle} from '@/apis/common.js'
	export default {
		data() {
			return {
				pageSize:20,
				list:[]
			}
		},
		mounted() {
			getFriendCircle({pageSize:this.pageSize}).then(res=>{
				for(let i=0; i<res.length; i++){
					let temp=res[i].shipaiPic
					res[i].shipaiPic=temp.substring(1,temp.length-1).split(',')
				}
				this.list=res
			})
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	.discover{
		padding: 20rpx;
	}
	.friend-list{
		margin-bottom: 30rpx;
		padding: 30rpx;
		background-color: #fff;
	}
	.image-box{
		margin-top: 30rpx;
		display: flex;
		width: 100%;
		.img{
			width: 33.33%;
			flex: 33%;
			margin: 0 5px;
		}
	}
</style>
